#include<stdio.h>
#include<math.h>
int main()
{		     	   
    int i=1;
    double x,eps,result=0,a=1,b,c=1,s,old;
    printf("Enter x & eps:");
    scanf("%lf%lf",&x,&eps);
    b=x;
    s=sin(x);
    do
    {		     	   
        old = result;
        result=result+(a*b)/c;
        a=a*(-1);
        i=i+2;
        b=b*x*x;
        c=c*(i-1)*i;
    }
    while(fabs(old-result)>eps);
    printf("sin(%f)=%f\n",x,s);
    printf("%d,sin(%f)=%f\n",(i/2),x,result);
    return 0;
}